]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Bug 591626 - Fix crash in ShellAppMonitor
authorColin Walters <walters@verbum.org>
Wed, 12 Aug 2009 23:45:17 +0000 (19:45 -0400)
committerColin Walters <walters@verbum.org>
Wed, 12 Aug 2009 23:45:17 +0000 (19:45 -0400)
Pass application into signal as expected.  Be sure to reference
it across the call, since removal from the hash unrefs it.

src/shell-app-monitor.c

index ebeba0e9cca5dd60355f380d7aaa42b6213e072d..08ce67ee0f8d41183f89175d7a5d02baa88315f0 100644 (file)
@@ -595,6 +595,8 @@ shell_app_monitor_on_window_removed (MetaWorkspace   *workspace,
   if (!app)
     return;
 
+  shell_app_info_ref (app);
+
   usage = get_app_usage_from_window (self, window);
 
   if (window == self->watched_window)
@@ -609,8 +611,10 @@ shell_app_monitor_on_window_removed (MetaWorkspace   *workspace,
   if (usage->window_count == 0)
     {
       usage->initially_seen_sequence = 0;
-      g_signal_emit (self, signals[APP_REMOVED], 0);
+      g_signal_emit (self, signals[APP_REMOVED], 0, app);
     }
+
+  shell_app_info_unref (app);
 }
 
 static void